File -> New Project -> New Directory -> New Project
Credit:Allison horst
Credit:Allison horst
E.g.: CBS
meta_tibble = tibble::tibble(
var_name = c('NIGHTWK', 'SATWK', 'SUNWK', 'HWUSUAL'),
var_label = c('Night work', 'Saturday work', 'Sunday work', 'Hours worked'),
pref_dtype = c('factor', 'factor', 'factor', 'numeric'),
dset_dtype = c('numeric', 'numeric', 'numeric', 'numeric'),
missing = list(c('9',''), c('9',''), c('9',''), c('00','99',''))
)
print(meta_tibble)## # A tibble: 4 × 5
## var_name var_label pref_dtype dset_dtype missing
## <chr> <chr> <chr> <chr> <list>
## 1 NIGHTWK Night work factor numeric <chr [2]>
## 2 SATWK Saturday work factor numeric <chr [2]>
## 3 SUNWK Sunday work factor numeric <chr [2]>
## 4 HWUSUAL Hours worked numeric numeric <chr [3]>
meta_table = data.table::data.table(
var_name = c('NIGHTWK', 'SATWK', 'SUNWK', 'HWUSUAL'),
var_label = c('Night work', 'Saturday work', 'Sunday work', 'Hours worked'),
pref_dtype = c('factor', 'factor', 'factor', 'numeric'),
dset_dtype = c('numeric', 'numeric', 'numeric', 'numeric'),
missing = list(c('9',''), c('9',''), c('9',''), c('00','99',''))
)
print(meta_table)## var_name var_label pref_dtype dset_dtype missing
## 1: NIGHTWK Night work factor numeric 9,
## 2: SATWK Saturday work factor numeric 9,
## 3: SUNWK Sunday work factor numeric 9,
## 4: HWUSUAL Hours worked numeric numeric 00,99,
to apply on entire dataset or data parts